package org.jeecg.config.app;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 微信配置(小程序)
 * @author: Young Jun
 * @date: 2023年06月17日 16:08
 */
@Configuration
public class WechatConfig {
    @Value("${wx.miniapp.appid}")
    private String miniAppID;
    @Value("${wx.miniapp.secret}")
    private String miniSecret;
    @Value("${wx.mall.mch-id}")
    private String mchId;
    @Value("${wx.mall.grant-type}")
    private String grantType;

    @Bean
    public void initWechatConfiguration(){
        WechatUtil.setMiniAppID(miniAppID);
        WechatUtil.setMiniSecret(miniSecret);
    };
}
